PHP Programing language

adplus-dvertising
How can using if statement inside for loop
Previous Home Next
<html>
<head><title>Using IF statement in for loop</title></head>
<body>
<div>
<?php
  $a = 3;
  for (; $a <= 20; $a++){
      if ($a == 0){
          break;
      }    
      $divide = 40/$a;
      echo "The result of dividing 40 by $a is $divide", "<BR>";
  }
  ?>
</div>
</body>
</html>
output
Previous Home Next